﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 库存调拨基础输入参数
/// </summary>
public class AllocateBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>
    public virtual string? AllocateCode { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    public virtual string? Documents { get; set; }
    
    /// <summary>
    /// 调拨日期
    /// </summary>
    public virtual DateTime? AllocateData { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public virtual long? AllocateType { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public virtual string? Moveehouse { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public virtual string? Pullhouse { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    public virtual string? StorageId { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    public virtual int? AllocateNum { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public virtual int? AllocatePrice { get; set; }
    
    /// <summary>
    /// 经办人ID
    /// </summary>
    public virtual long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 调拨货物
    /// </summary>
    public virtual long? AllocateGoods { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public virtual DateTime? PreparationData { get; set; }
    
    /// <summary>
    /// 审核Id
    /// </summary>
    public virtual long? Audit { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public virtual long? AuditData { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
}

/// <summary>
/// 库存调拨分页查询输入参数
/// </summary>
public class PageAllocateInput : BasePageInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    public string? Documents { get; set; }
    
    /// <summary>
    /// 调拨日期范围
    /// </summary>
     public DateTime?[] AllocateDataRange { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public long? AllocateType { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public string? Moveehouse { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public string? Pullhouse { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    public string? StorageId { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    public int? AllocateNum { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public int? AllocatePrice { get; set; }
    
    /// <summary>
    /// 经办人ID
    /// </summary>
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 调拨货物
    /// </summary>
    public long? AllocateGoods { get; set; }
    
    /// <summary>
    /// 制单时间范围
    /// </summary>
     public DateTime?[] PreparationDataRange { get; set; }
    
    /// <summary>
    /// 审核Id
    /// </summary>
    public long? Audit { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public long? AuditData { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 库存调拨增加输入参数
/// </summary>
public class AddAllocateInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "调拨单号字符长度不能超过32")]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [MaxLength(32, ErrorMessage = "单据状态字符长度不能超过32")]
    public string? Documents { get; set; }
    
    /// <summary>
    /// 调拨日期
    /// </summary>
    public DateTime? AllocateData { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public long? AllocateType { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    [MaxLength(32, ErrorMessage = "调入仓库字符长度不能超过32")]
    public string? Moveehouse { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    [MaxLength(32, ErrorMessage = "调出仓库字符长度不能超过32")]
    public string? Pullhouse { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [MaxLength(32, ErrorMessage = "入库状态字符长度不能超过32")]
    public string? StorageId { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    public int? AllocateNum { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public int? AllocatePrice { get; set; }
    
    /// <summary>
    /// 经办人ID
    /// </summary>
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 调拨货物
    /// </summary>
    public long? AllocateGoods { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public DateTime? PreparationData { get; set; }
    
    /// <summary>
    /// 审核Id
    /// </summary>
    public long? Audit { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public long? AuditData { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 库存调拨删除输入参数
/// </summary>
public class DeleteAllocateInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 库存调拨更新输入参数
/// </summary>
public class UpdateAllocateInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "调拨单号字符长度不能超过32")]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>    
    [MaxLength(32, ErrorMessage = "单据状态字符长度不能超过32")]
    public string? Documents { get; set; }
    
    /// <summary>
    /// 调拨日期
    /// </summary>    
    public DateTime? AllocateData { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>    
    public long? AllocateType { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>    
    [MaxLength(32, ErrorMessage = "调入仓库字符长度不能超过32")]
    public string? Moveehouse { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>    
    [MaxLength(32, ErrorMessage = "调出仓库字符长度不能超过32")]
    public string? Pullhouse { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>    
    [MaxLength(32, ErrorMessage = "入库状态字符长度不能超过32")]
    public string? StorageId { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>    
    public int? AllocateNum { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>    
    public int? AllocatePrice { get; set; }
    
    /// <summary>
    /// 经办人ID
    /// </summary>    
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 调拨货物
    /// </summary>    
    public long? AllocateGoods { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>    
    public DateTime? PreparationData { get; set; }
    
    /// <summary>
    /// 审核Id
    /// </summary>    
    public long? Audit { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>    
    public long? AuditData { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 库存调拨主键查询输入参数
/// </summary>
public class QueryByIdAllocateInput : DeleteAllocateInput
{
}

/// <summary>
/// 库存调拨数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAllocateInput : BaseImportInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [ImporterHeader(Name = "调拨单号")]
    [ExporterHeader("调拨单号", Format = "", Width = 25, IsBold = true)]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [ImporterHeader(Name = "单据状态")]
    [ExporterHeader("单据状态", Format = "", Width = 25, IsBold = true)]
    public string? Documents { get; set; }
    
    /// <summary>
    /// 调拨日期
    /// </summary>
    [ImporterHeader(Name = "调拨日期")]
    [ExporterHeader("调拨日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? AllocateData { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    [ImporterHeader(Name = "调拨类型")]
    [ExporterHeader("调拨类型", Format = "", Width = 25, IsBold = true)]
    public long? AllocateType { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    [ImporterHeader(Name = "调入仓库")]
    [ExporterHeader("调入仓库", Format = "", Width = 25, IsBold = true)]
    public string? Moveehouse { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    [ImporterHeader(Name = "调出仓库")]
    [ExporterHeader("调出仓库", Format = "", Width = 25, IsBold = true)]
    public string? Pullhouse { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [ImporterHeader(Name = "入库状态")]
    [ExporterHeader("入库状态", Format = "", Width = 25, IsBold = true)]
    public string? StorageId { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    [ImporterHeader(Name = "调拨数量")]
    [ExporterHeader("调拨数量", Format = "", Width = 25, IsBold = true)]
    public int? AllocateNum { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    [ImporterHeader(Name = "调拨金额")]
    [ExporterHeader("调拨金额", Format = "", Width = 25, IsBold = true)]
    public int? AllocatePrice { get; set; }
    
    /// <summary>
    /// 经办人ID
    /// </summary>
    [ImporterHeader(Name = "经办人ID")]
    [ExporterHeader("经办人ID", Format = "", Width = 25, IsBold = true)]
    public long? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 调拨货物
    /// </summary>
    [ImporterHeader(Name = "调拨货物")]
    [ExporterHeader("调拨货物", Format = "", Width = 25, IsBold = true)]
    public long? AllocateGoods { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    [ImporterHeader(Name = "制单时间")]
    [ExporterHeader("制单时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? PreparationData { get; set; }
    
    /// <summary>
    /// 审核Id
    /// </summary>
    [ImporterHeader(Name = "审核Id")]
    [ExporterHeader("审核Id", Format = "", Width = 25, IsBold = true)]
    public long? Audit { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    [ImporterHeader(Name = "审核时间")]
    [ExporterHeader("审核时间", Format = "", Width = 25, IsBold = true)]
    public long? AuditData { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
}
